<template>
  <div class="child">
    <h3>我是Child</h3>
    <p>当前的数量是{{$root.count}}</p>
  </div>
</template>

<script>
export default {
    name:"Props",
    mounted() {
        console.log(this.$root.count,"child");
    },  
}
</script>

<style scoped>
.child{
    background: pink;
}
</style>